import myAxios from '@/utils/request'
// 分页查询订单
export const orderQueryApi = (params) => myAxios.get('/orders/page', { params })

// 获取订单详情
export const getOrderDetailApi = (orderNo) => myAxios.get(`/orders/${orderNo}`)

// 配货
export const goodsAllocatedApi = (id) => myAxios.put(`/orders/allocated/${id}`)

// 出库
export const goodsDeliveredApi = (id) => myAxios.put(`/orders/delivered/${id}`)
/**
 *
 * @param {id: 订单id , extraInfo: 取消原因} data
 * @returns
 */
export const cancelOrderApi = (data) => myAxios.put(`/orders/cancel`, data)

// 获取个状态的订单数据
export const getStatisticsOrderCountApi = () =>
  myAxios.get('/orders/statistics')
